package com.enjoyor.soa.traffic.server.efoms.dubbo.manage;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;

import com.alibaba.dubbo.config.annotation.Service;
import com.alibaba.fastjson.JSONArray;
import com.enjoyor.soa.traffic.api.dto.efoms.AssentFileInfoDto;
import com.enjoyor.soa.traffic.core.efoms.domain.AssentFileInfo;
import com.enjoyor.soa.traffic.core.efoms.service.IAssentFileInfoService;
import com.enjoyor.soa.traffic.util.helper.ReflectHelper;
import com.enjoyor.soa.traffic.util.pojo.ResultPojo;

@Service
public class ManageAssentFileInfoService {

	@Autowired
	private IAssentFileInfoService assentFileInfoService;
	
	public ResultPojo insertAssentFileInfo(String list, String personName) {
		// TODO Auto-generated method stub
		List<AssentFileInfo> AssentFileInfoList = JSONArray.parseArray(list, AssentFileInfo.class);
		return assentFileInfoService.insertAssentFileInfo(AssentFileInfoList, personName);
	}

	
	public ResultPojo deleteAssentFileInfo(String fileId, String personName) {
		// TODO Auto-generated method stub
		return assentFileInfoService.deleteAssentFileInfo(fileId, personName);
	}

	
	public ResultPojo getAssentFileInfoList(String fileId, String devId, String devTypeCode, String devCategoryCode) {
		// TODO Auto-generated method stub
		ResultPojo pojo = assentFileInfoService.getAssentFileInfoList(fileId, devId, devTypeCode, devCategoryCode);
		//List<AssentFileInfo> list = (List<AssentFileInfo>) pojo.getResultList();
		//ResultPojo resultPojo = new ResultPojo();
		//resultPojo.setResultList(list);
		return pojo;
	} 
}
